/*fq*/
angular.module('indexApp')
    .controller('inviteCtrl', function ($scope, $state, $rootScope, $http, $stateParams) {
        var vm = this;
        $scope.state = $state;
        vm.http = $rootScope.http;
        $http({
            method: 'post',
            url: $rootScope.http + 'my_invite',
            data: {
                user_id: $rootScope.id
            }
        })
            .then(function successCallback(res) {
                console.log(res.data);
                if(res.data.code==0){
                    vm.data=res.data.data;
                }
            }, function errorCallback(res) {// 请求失败执行代码
                $rootScope.alertError()
            });
        vm.tel=function (tel) {
            window.location.href = "tel:"+tel;
        }
    });